#pragma once

#include <memory>
#include <pybind11/pybind11.h>

#include "coin2/exchange/base/feed/rest/market_data_client.h"


namespace appcoin2::support::feed {

class PyMarketDataClient {
 public:
  PyMarketDataClient();
  pybind11::bytes QueryKlines(const std::string& req);
  pybind11::bytes QueryTopLongShortAccountRatio(const std::string& req);
  pybind11::bytes QueryTopLongShortPositionRatio(const std::string& req);
  pybind11::bytes QueryGlobalLongShortAccountRatio(const std::string& req);
  pybind11::bytes QueryTakerBuySellRatio(const std::string& req);
  pybind11::bytes QueryOpenInterestHist(const std::string& req);
 private:
  template <typename TradingDataQueryFun>
  pybind11::bytes QueryTradingData(TradingDataQueryFun query_ptr, const std::string& req);
  std::unique_ptr<coin2::exchange::base::feed::rest::MarketDataClient> client_;
};

}  // namesapce appcoin2::support::feed
